#include<bits/stdc++.h>
using namespace std;
const int N = 100010;
int a[N],n;//the attack of a[i]
int atk[N];//the amount of i attack
int rest;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);


    int n;
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
        atk[a[i]]++;
    }
    sort(a+1,a+1+n);
    for(int i=1;i<=n;i++){
        while(a[i]==a[i-1]){
                i++;
                if(i>n)break;
        }
        rest=max(0,rest-atk[a[i]]);


        rest+=atk[a[i]];
    }

    printf("%d\n",rest);
    return 0;
}
